package com.clusterswisdom.horn.api.ioc.api;

import org.dom4j.Element;

public class ResponseField {
	
	public static final String SOURCE_INPUT = "input";
	
	public static final String SOURCE_RESPONSE = "response";

	private String name;
	
	private ParamType type;
	
	private String source;
	
	private String property;
	
	private String defaultValue;
	
	private String note;
	
	public ResponseField(Element element) {
		name = element.attributeValue("name");
		type = ParamType.findByName(element.attributeValue("type"));
		source = element.attributeValue("source");
		property = element.attributeValue("property");
		defaultValue = element.attributeValue("default");
		note = element.attributeValue("note");
	}

	public String getName() {
		return name;
	}
	
	public ParamType getType() {
		return type;
	}

	public String getNote() {
		return note;
	}

	public String getSource() {
		return source;
	}

	public String getProperty() {
		return property;
	}

	public String getDefaultValue() {
		return defaultValue;
	}
}